<template>
  <n-select v-bind="$attrs" @update:value="handleUpdateValue" :value="modelValue" filterable />
</template>

<script setup lang="ts">

  const props = defineProps({
    modelValue: {
      type: String,
      default: '',
    },
    label: {
      type: String,
      default: '',
    },
  });
  const emits = defineEmits(['update:modelValue', 'update:label']);

  function handleUpdateValue(value: string, option: any) {
    //   console.log(value, getAddressByCode(value));
    emits('update:modelValue', value);
    emits('update:label', option.label);
  }
</script>

<style scoped></style>
